package com.example.data.permission.mp.mate.scope;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * Created by TD on 2021/8/26
 */
public class DataScopeProperty {
    private String type;
    private List<DataColumnProperty> columns;

    public DataScopeProperty() {
    }

    public void setColumns(DataColumn[] var1) {
        if (null != var1 && var1.length > 0) {
            this.columns = (List) Arrays.stream(var1).map((var0) -> {
                return new DataColumnProperty(var0.alias(), var0.name());
            }).collect(Collectors.toList());
        }

    }

    public String getType() {
        return this.type;
    }

    public List<DataColumnProperty> getColumns() {
        return this.columns;
    }

    public void setType(String var1) {
        this.type = var1;
    }
}
